<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

    <title></title>

    [#include "/admin/include/admin_static.htm"]
    [#import "/admin/include/admin_pagination.ftl" as p/]
    <script type="text/javascript">

        layui.use('form', function(){
            var form = layui.form(), $=layui.jquery, layer = layui.layer;
            form.on('switch(switch)', function(data){

                if(data.elem.checked){
                    $('#status').val(1);
                }else{
                    $('#status').val(-1);
                }
            });
            form.on('submit(success)', function(data){
                var index = layer.load();
                ajax({
                    url:"${path}/admin/cash/cashVerify.aspx",
                    data: data.field,
                    success: function(result){
                        layer.msg(result.content,{time:500}, function(){
                            location.href='${path}/admin/cash/list.aspx?status=0';
                        });
                        layer.close(index);
                    },
                    complete:function(){
                        layer.close(index);
                    },error:function(){
                        layer.close(index);
                    }
                });
                return false;
            });

        });

    </script>
</head>
<body>
<div class="main_admin_content">
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
        <legend>提现审核</legend>
    </fieldset>
    <form class="layui-form" action="">
        <div class="layui-form-item">
            <label class="layui-form-label">用户名:</label>
            <div class="layui-input-block">
                <input type="text" name="title" readonly autocomplete="off" value="${cash.u_user_name }" class="layui-input">
            </div>

            <label class="layui-form-label">真实姓名：</label>
            <div class="layui-input-block">
                <input type="text" name="title" readonly autocomplete="off" value="${realName.real_name }" class="layui-input">
            </div>

            <label class="layui-form-label">身份证号码：</label>
            <div class="layui-input-block">
                <input type="text" name="title" readonly autocomplete="off" value="${(realName.id_number)!'' }" class="layui-input">
            </div>

            <label class="layui-form-label">提现银行：</label>
            <div class="layui-input-block">
                <input type="text" name="title" readonly autocomplete="off" value="${cash.bank }" class="layui-input">
            </div>

            <label class="layui-form-label">支行：</label>
            <div class="layui-input-block">
                <input type="text" name="title" readonly autocomplete="off" value="${cash.branch }" class="layui-input">
            </div>

            <label class="layui-form-label">提现账号：</label>
            <div class="layui-input-block">
                <input type="text" name="title" readonly autocomplete="off" value="${cash.crad_no }" class="layui-input">
            </div>

            <label class="layui-form-label">金额：</label>
            <div class="layui-input-block">
                <input type="text" name="title" readonly autocomplete="off" value="${cash.total }" class="layui-input">
            </div>
            <label class="layui-form-label">提现时间：</label>
            <div class="layui-input-block">
                <input type="text" name="title" readonly autocomplete="off" value="${p2p_date_format(cash.addtime,"yyyy-MM-dd HH:mm:ss") }" class="layui-input">
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">是否同意</label>
                <div class="layui-input-block">
                    <input name="status" id="status" value="1" style="display: none">
                    <input type="checkbox" name="isagree" lay-skin="switch" lay-text="同意|拒绝" lay-filter="switch"  value="1" [#if cash.status==0] checked="checked" [#else]  [#if cash.status==1]checked="checked" disabled[#else] disabled [/#if]  [/#if]>
                </div>
            </div>
            <input name="cashId"  type="hidden" value="${cash.id }"/>
            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">审核备注</label>
                <div class="layui-input-block">
                    <textarea placeholder="请输入备注" required lay-verify="required" class="layui-textarea" name="remark"  >${cash.verify_remark }</textarea>
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-input-block">
[#if cash.status==0]
                    <button  lay-submit lay-filter="success" class="layui-btn "   />审核</buttton>
[#else]

[/#if]
                </div>
            </div>
        </div>


        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
            <legend>资金记录</legend>
        </fieldset>



        <table class="layui-table">
            <colgroup>
                <col width="50">
                <col width="80">
                <col width="80">
                <col width="80">
                <col width="80">
                <col width="80">
                <col width="80">
                <col width="80">
                <col width="80">
                <col width="80">
                <col width="80">


            </colgroup>
            <thead>
            <tr>
                <th>用户ID</th>
                <th>用户名称</th>
                <th>记录编号</th>
                <th>记录类型</th>
                <th>账户总额</th>
                <th>操作金额</th>
                <th>可用余额</th>
                <th>冻结金额</th>
                <th>待收金额</th>
                <th>记录时间</th>
                <th>记录备注</th>
            </tr>
            </thead>
        [#list logs as log]

            <tr>
                <td>${log.user_id}</td>
                <td>
                ${log.userName }</td>
                <td>${log.id }</td>
                <td>${log.logName }</td>
                <td>￥${log.total}</td>
                <td>￥${log.money}</td>
                <td>￥${log.balance}</td>
                <td>￥${log.freezing_amont}</td>
                <td>￥${log.collection}</td>
                <td>${log.addtime }</td>
                <td>${log.remark}</td>
            </tr>[/#list]

        </table>
    </form>
</div>

</body>
</html>